package com.example.module_service.api

import com.example.lib_common.view.api.BaseApiServer
import com.example.module_service.entity.CarAddEntity
import com.example.module_service.entity.CarAddParam
import com.example.module_service.entity.CarPayEntity
import com.example.module_service.entity.CarStopEntityItem
import com.example.module_service.entity.MemberEntity
import com.example.module_service.entity.MerchantEntity
import com.example.module_service.entity.MerchantEntityItem
import com.example.module_service.model.ServiceResultData
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.PUT
import retrofit2.http.Path
import retrofit2.http.Query
import javax.inject.Inject

interface ServiceApiService :BaseApiServer{
    @GET("/api/enterprise-profiles")
    suspend fun getMerchant():ServiceResultData<List<MerchantEntityItem>>



    //增加车辆信息
    @POST("/api/vehicles")
    suspend fun getAddCar(@Body carAddParam: CarAddParam):ServiceResultData<CarAddEntity>
    //增加消费记录
    @POST("/api/parking-payments")
    suspend fun getAddCarPay(@Body carPayParam: CarPayEntity):ServiceResultData<CarPayEntity>
    //获取停车记录
    @GET("/api/parking-payments")
    suspend fun getCarStop():ServiceResultData<List<CarStopEntityItem>>


    //获取会员消息
    @GET("/memberships/{userId}")
    suspend fun getMember(@Path("userId") userid:Int):ServiceResultData<MemberEntity>
    //升级会员
    @PUT("/memberships/{userId}/upgrade")
    suspend fun getMemberChange(@Query("newMembershipLevel")newMembershipLevel:String,@Path("userId")userId :Int):ServiceResultData<MemberEntity>
}